<?php

/*
 * Programa ShopCommerce
 * Versão 1.0 
 * Classe Clientes
 */

class Validacao {

    function __construct() {
        
    }

    /*
     *  Função de busca de Endereço pelo CEP 
     *  -   Desenvolvido Felipe Olivaes para ajaxbox.com.br 
     *  -   Utilizando WebService de CEP da republicavirtual.com.br 
     */

    function validaBrownser() {
        $matched = null;
        $useragent = $_SERVER['HTTP_USER_AGENT'];
        if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $useragent, $matched)) {
            $browser_version = $matched[1];
            return $browser = 'css/styleIE.css';
        } elseif (preg_match('|Opera/([0-9].[0-9]{1,2})|', $useragent, $matched)) {
            $browser_version = $matched[1];
            return $browser = 'css/style.css';
        } elseif (preg_match('|Firefox/([0-9\.]+)|', $useragent, $matched)) {
            $browser_version = $matched[1];
            return $browser = 'css/style.css';
        } elseif (preg_match('|Chrome/([0-9\.]+)|', $useragent, $matched)) {
            $browser_version = $matched[1];
            return $browser = 'css/style.css';
        } elseif (preg_match('|Safari/([0-9\.]+)|', $useragent, $matched)) {
            $browser_version = $matched[1];
            return $browser = 'css/style.css';
        } else {
            // browser not recognized!
            $browser_version = 0;
            return $browser = 'css/style.css';
        }
    }

}

?>
